---
title: Query a Table
sidebarTitle: Query a Table
---

## Description

The `query()` function is executed on a data source connected to MindsDB and saved into a variable. It queries a table from this data source.

## Syntax

Here is the syntax:

```sql
my_data_source.query('SELECT * FROM my_table LIMIT 100')
```
